﻿using UnityEngine;
using UnityGameFramework.Runtime;

namespace GFTest
{
    //[XLua.LuaCallCSharp]
    [DisallowMultipleComponent]
    public class LogComponent : GameFrameworkComponent
    {
        [SerializeField]
        private Programmer m_ProgrammerLogFilter = 0;

        public Programmer ProgrammerLogFilter
        {
            get
            {
                return m_ProgrammerLogFilter;
            }
            set
            {
                m_ProgrammerLogFilter = value;
            }
        }

        public bool IsMyCare(Programmer programmer)
        {
            int value = 1 << (int)programmer;
            return ((int)m_ProgrammerLogFilter & value) == value;
        }
    }
}
